

import request from '@/utils/request.ts'

// 获取轮播图
export const getBanner = () => {
    return request({
        url: '/banner/list',   //接口地址
        method: 'get',
        data:{}
    })
}


// 获取商品分页列表 数据
// count	Number	 页码,默认值为1
// limitNum	Number	 每页显示个数,默认值为10

export const getGoodsList = (count)=>{
    return request({
        url:'/pro/list',
        method:'get',
        params:{
            count,
            // limitNum:6
        }
    })
}

// 获取推荐 商品列表
export const getGoodsListPro = ({count})=>{
    return request({
        url:'/pro/recommendlist',
        method:'get',
        params:{
            count,
            limitNum:4
        }
    })
}


// 获取推荐的商品数据
export const getRecommendList = (count)=>{
    return request({
        url:'/pro/recommendlist',
        method:'get',
        params:{
            count,
        }
    })
}

// 获取秒杀商品列表数据
export const getSecondKillGoods=()=>{
    return request({
        url:'/pro/seckilllist',
        method:'get',
        params:{
            count:1
        }
    })
}

// 宫格数据
export const getGridList = () => {
    const gridList = [
      {
        id: 1,
        text: '京东超市',
        url:
          'https://m15.360buyimg.com/mobilecms/jfs/t1/175540/24/19329/6842/60ec0b0aEf35f7384/ec560dbf9b82b90b.png!q70.jpg',
      },
      {
        id:2 ,
        text: '数码电器',
        url:
          'https://m15.360buyimg.com/mobilecms/jfs/t1/178015/31/13828/6862/60ec0c04Ee2fd63ac/ccf74d805a059a44.png!q70.jpg',
      },
      {
        id: 3,
        text: '京东新百货',
        url:
          'https://m15.360buyimg.com/mobilecms/jfs/t1/54043/33/19389/4660/62b049dbE3b9aef75/2fcd31afd5d702e4.png!q70.jpg',
      },
      {
        id:4 ,
        text: '京东生鲜',
        url:
          'https://m15.360buyimg.com/mobilecms/jfs/t1/177902/16/13776/5658/60ec0e71E801087f2/a0d5a68bf1461e6d.png!q70.jpg',
      },
      {
        id: 5,
        text: '京东到家',
        url:
          'https://m15.360buyimg.com/mobilecms/jfs/t1/196472/7/12807/7127/60ec0ea3Efe11835b/37c65625d94cae75.png!q70.jpg',
      },
      {
        id: 6,
        text: '京东超市',
        url:
          'https://m15.360buyimg.com/mobilecms/jfs/t1/175540/24/19329/6842/60ec0b0aEf35f7384/ec560dbf9b82b90b.png!q70.jpg',
      },
      {
        id: 7,
        text: '数码电器',
        url:
          'https://m15.360buyimg.com/mobilecms/jfs/t1/178015/31/13828/6862/60ec0c04Ee2fd63ac/ccf74d805a059a44.png!q70.jpg',
      },
      {
        id:8 ,
        text: '京东新百货',
        url:
          'https://m15.360buyimg.com/mobilecms/jfs/t1/54043/33/19389/4660/62b049dbE3b9aef75/2fcd31afd5d702e4.png!q70.jpg',
      },
      {
        id: 9,
        text: '京东生鲜',
        url:
          'https://m15.360buyimg.com/mobilecms/jfs/t1/177902/16/13776/5658/60ec0e71E801087f2/a0d5a68bf1461e6d.png!q70.jpg',
      },
      {
        id: 10,
        text: '京东到家',
        url:
          'https://m15.360buyimg.com/mobilecms/jfs/t1/196472/7/12807/7127/60ec0ea3Efe11835b/37c65625d94cae75.png!q70.jpg',
      },
    ]  
    return gridList
  }